<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileOverview 뷰어 > 지면뷰어 > 사이드바 > 이미지형 보기 타입의 모델
<span class='line'>  3</span>  * @author dioong
<span class='line'>  4</span>  */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.viewer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="NAME">nhn.newsstand.viewer.sidebar</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer.sidebar</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="NAME">nhn.newsstand.viewer.sidebar.ImageType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer.sidebar.ImageType</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="NAME">nhn.newsstand.viewer.sidebar.ImageType.Model</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Class</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends nhn.newsstand.viewer.sidebar.ImageType.Model.prototype */</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">	</span><span class="NAME">_aThumnailWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">150</span><span class="PUNC">,</span><span class="NUMB">100</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">	</span><span class="NAME">_htListData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 15</span> 	 * nhn.newsstand.viewer.sidebar.ImageType.Model 클래스의 인스턴스를 생성한다.
<span class='line'> 16</span> 	 * @constructs
<span class='line'> 17</span> 	 * @class 뷰어 > 지면뷰어 > 사이드바 > 이미지형 보기 타입의 모델 
<span class='line'> 18</span> 	 * @requires window.ImageUrlGenerator
<span class='line'> 19</span> 	 * @example
<span class='line'> 20</span> 	 * var oModel = new nhn.newsstand.viewer.sidebar.ImageType.Model();
<span class='line'> 21</span> 	 */</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">	</span><span class="NAME">$init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 25</span> 	 * imageType 신문 페이지 갯수에 따라 썸네일 URL 배열을 생성하는 함수 
<span class='line'> 26</span> 	 * @param {Number} nViewType 한면보기 양면보기  1||2
<span class='line'> 27</span> 	 * @param {Array} aPageInfo 페이지 정보(from server)
<span class='line'> 28</span> 	 * @param {String} sPressCode 신문사 코드
<span class='line'> 29</span> 	 * @return {Array} 이미지 URL배열
<span class='line'> 30</span> 	 */</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">	</span><span class="NAME">makeIMGURL</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">aPageInfo</span><span class="PUNC">,</span><span class="NAME">sPressCode</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">150</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//한면보기 일 때는 너비 값 150, 두면 보기에서는 100</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIMGURL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oTpl</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htPageInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageInfo.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">nLen</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">			</span><span class="NAME">htPageInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">			</span><span class="NAME">aIMGURL.push</span><span class="PUNC">(</span><span class="NAME">ImageUrlGenerator</span><span class="PUNC">(</span><span class="STRN">"news"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">+</span><span class="STRN">"_"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sPressCode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPageInfo.publDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPageInfo.publType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPageInfo.editionNo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">createImageUrl</span><span class="PUNC">(</span><span class="NAME">window.NORMAL_URL</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aIMGURL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 44</span> 	 * imageType 썸네일 URL생성 함수 
<span class='line'> 45</span> 	 * @param {Number} nDPI 배율
<span class='line'> 46</span> 	 * @param {String} sPreCode 신문사 코드
<span class='line'> 47</span> 	 * @param {String} sDate 발행날짜
<span class='line'> 48</span> 	 * @param {String} sPublType 발행타입 (조간|석간)
<span class='line'> 49</span> 	 * @param {Number} nEditionNo 발행호 번호
<span class='line'> 50</span> 	 * @param {Number} nPageNum 페이지 번호 
<span class='line'> 51</span> 	 * @return {String} 이미지 URL배열
<span class='line'> 52</span> 	 */</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">	</span><span class="NAME">getThumbURL</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sPreCode</span><span class="PUNC">,</span><span class="NAME">sDate</span><span class="PUNC">,</span><span class="NAME">sPublType</span><span class="PUNC">,</span><span class="NAME">nEditionNo</span><span class="PUNC">,</span><span class="NAME">nPageNum</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">		</span><span class="NAME">sPublType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NAME">sPublType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"MORNING"</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"m"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">ImageUrlGenerator</span><span class="PUNC">(</span><span class="STRN">"news"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">+</span><span class="STRN">"_"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sPreCode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sPublType</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nEditionNo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">createImageUrl</span><span class="PUNC">(</span><span class="NAME">window.NORMAL_URL</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 59</span> 	 * 미니맵 크기 계산하는 함수 
<span class='line'> 60</span> 	 * @param {HashTable} htThumbSize 썸네일 이미지 사이즈
<span class='line'> 61</span> 	 * @param {HashTable} htPaperSize 신문 사이즈
<span class='line'> 62</span> 	 * @param {HashTable} htViewerSize 뷰어
<span class='line'> 63</span> 	 * @return {HashTable} 미니맵 사이즈 
<span class='line'> 64</span> 	 */</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">	</span><span class="NAME">calcMiniMapSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htThumbSize</span><span class="PUNC">,</span><span class="NAME">htPaperSize</span><span class="PUNC">,</span><span class="NAME">htViewerSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htViewerSize.width</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htThumbSize.width</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htPaperSize.width</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">			</span><span class="STRN">'height'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htViewerSize.height</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htThumbSize.height</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htPaperSize.height</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 73</span> 	 * 썸네일 순서 번호 계산하는 함수 
<span class='line'> 74</span> 	 * @param {Number} nViewType 한면보기 양면보기  1||2
<span class='line'> 75</span> 	 * @param {Number} nPageNum 페이지 번호
<span class='line'> 76</span> 	 * @return {Number} 페이지 번호 
<span class='line'> 77</span> 	 */</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="NAME">calcThumSeq</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">nPageNum</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">		</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//cast to number;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 84</span> 	 * 썸네일상의 미니맵 위치 계산 
<span class='line'> 85</span> 	 * @param {HashTable} htThumbSize 썸네일 사이즈
<span class='line'> 86</span> 	 * @param {HashTable} htPaperSize 신문 크기
<span class='line'> 87</span> 	 * @param {HashTable} htViewerPos 뷰어 위치(top,left)
<span class='line'> 88</span> 	 * @return {HashTable} 썸네일상의 미니맵 위치(top,left)
<span class='line'> 89</span> 	 */</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	</span><span class="NAME">calcMiniMapPos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htThumbSize</span><span class="PUNC">,</span><span class="NAME">htPaperSize</span><span class="PUNC">,</span><span class="NAME">htViewerPos</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">			</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htThumbSize.height</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htViewerPos.top</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htPaperSize.height</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">			</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htThumbSize.width</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htViewerPos.left</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htPaperSize.width</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 98</span> 	 * 뷰어 상의 신문 위치 계산  
<span class='line'> 99</span> 	 * @param {HashTable} htThumbSize 썸네일 사이즈
<span class='line'>100</span> 	 * @param {HashTable} htPaperSize 신문 크기
<span class='line'>101</span> 	 * @param {HashTable} htMiniMapPos 뷰어 위치(top,left)
<span class='line'>102</span> 	 * @param {Number} nViewType 뷰어 위치(top,left)
<span class='line'>103</span> 	 * @return {HashTable} 뷰어 상의 신문 위치(top,left)
<span class='line'>104</span> 	 */</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">	</span><span class="NAME">calPaperPos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htThumbSize</span><span class="PUNC">,</span><span class="NAME">htPaperSize</span><span class="PUNC">,</span><span class="NAME">htMiniMapPos</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">			</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htPaperSize.height</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htMiniMapPos.top</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htThumbSize.height</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">			</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htPaperSize.width</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="NAME">htMiniMapPos.left</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="PUNC">(</span><span class="NAME">htThumbSize.width</span><span class="PUNC">*</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>113</span> 	 * 썸네일 사이즈 계산 
<span class='line'>114</span> 	 * @param {Number} nViewType 한면보기 양면보기  1||2
<span class='line'>115</span> 	 * @param {HashTable} htOriginPaperSize 신문 원본 사이즈
<span class='line'>116</span> 	 * @return {HashTable} 썸네일 사이즈
<span class='line'>117</span> 	 */</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">	</span><span class="NAME">calcThumbnailSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">htOriginPaperSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nThumbWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this._aThumnailWidth</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="NAME">this._aThumnailWidth</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT">  </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">			</span><span class="STRN">'height'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htOriginPaperSize.height</span><span class="PUNC">*</span><span class="NAME">nThumbWidth</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">htOriginPaperSize.width</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nThumbWidth</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>127</span> 	 * 면에 대한 정보를 반환하는 함수 
<span class='line'>128</span> 	 * @return {HashTable} 면정보 배열
<span class='line'>129</span> 	 */</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="NAME">getListData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._htListData</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>135</span> 	 * imageType 썸네일 URL생성 함수 
<span class='line'>136</span> 	 * @param {HashTable} htListData 면에 대한 정보를 반환하는 함수
<span class='line'>137</span> 	 */</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">	</span><span class="NAME">setListData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htListData</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">		</span><span class="NAME">this._htListData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htListData</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>141</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>